home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / uucp / wuucp_0_0_29.lha / man / Compress.doc < prev    next >
Text File  |  1993-12-29  |  5KB  |  115 lines

  1.  
  2.      NAME
  3.       compress, uncompress, zcat - compress and expand data
  4.  
  5.      SYYNOPSIS
  6.       compress [ -f ] [ -v ] [ -c ] [ -V ] [ -b <bits> ] [ name ... ]
  7.       uncompress [ -f ] [ -v ] [ -c ] [ -V ] [ name ... ]
  8.       zcat [ -V ] [ name ... ]
  9.  
  10.       NOTE:  These three executables are exactly the same, simply named
  11.       differently causing different default action.
  12.  
  13.      DESCRIPTION
  14.       Compress reduces the size of the named files using adaptive
  15.       Lempel-Ziv coding.  Whenever possible, each file is replaced by
  16.       one with the extension .Z , while keeping the same ownership
  17.       modes, access and modification times.  If no files are specified,
  18.       the standard input is compressed to the standard output.
  19.       Compressed files can be restored to their original form using
  20.       uncompress or zcat.
  21.  
  22.       As of 1.16, AmigaUUCP's compress will decompress up to 16 bit
  23.       compression formats.    Default compression is 14 bits but may be
  24.       set to 16 bits with the '-b 16' option.  The minimum supported
  25.       compression bits is 12.
  26.  
  27.       The -f option will force compression of name. This is useful for
  28.       compressing an entire directory, even if some of the files do not
  29.       actually shrink.  If -f is not given and compress is run in the
  30.       foreground, the user is prompted as to whether an existing file
  31.       should be overwritten.
  32.  
  33.       The -c option makes compress/uncompress write to the standard
  34.       output; no files are changed.  The nondestructive behavior of
  35.       zcat is identical to that of uncompress -c.
  36.  
  37.       Compress uses the modified Lempel-Ziv algorithm popularized in "A
  38.       Technique for High Performance Data Compression", Terry A. Welch,
  39.       IEEE Computer, vol. 17, no. 6 (June 1984), pp. 8-19.    Common
  40.       substrings in the file are first replaced by 9-bit codes 257 and
  41.       up.  When code 512 is reached, the algorithm switches to 10-bit
  42.       codes and continues to use more bits until the limit specified by
  43.       the -b flag is reached (default 16).    Bits must be between 9 and
  44.       16.  The default can be changed in the source to allow compress
  45.       to be run on a smaller machine.
  46.  
  47.       After the bits limit is attained, compress periodically checks
  48.       the compression ratio.  If it is increasing, compress continues
  49.       to use the existing code dictionary.    However, if the compression
  50.       ratio decreases, compress discards the table of substrings and
  51.       rebuilds it from scratch.  This allows the algorithm to adapt to
  52.       the next "block" of the file.
  53.  
  54.       Note that the -b flag is omitted for uncompress, since the bits
  55.       parameter specified during compression is encoded within the
  56.       output, along with a magic number to ensure that neither
  57.       decompression of random data nor recompression of compressed data
  58.       is attempted.
  59.  
  60.       The amount of compression obtained depends on the size of the
  61.       input, the number of bits per code, and the distribution of
  62.       common substrings.  Typically, text such as source code or
  63.       English is reduced by 50-60%.  Compression is generally much
  64.       better than that achieved by Huffman coding (as used in pack), or
  65.       adaptive Huffman coding (compact), and takes less time to
  66.       compute.
  67.  
  68.       Under the -v option, a message is printed yielding the percentage
  69.       of reduction for each file compressed.
  70.  
  71.       If the -V option is specified, the current version and compile
  72.       options are printed on stderr.
  73.  
  74.       Exit status is normally 0; if the last file is larger after
  75.       (attempted) compression, the status is 2; if an error occurs,
  76.       exit status is 1.
  77.  
  78.      DIAGNOSTICS
  79.       Usage: compress [-dfvcV] [-b maxbits] [file ...]
  80.           Invalid options were specified on the command line.
  81.       Missing maxbits
  82.           Maxbits must follow -b.
  83.       file: not in compressed format
  84.           The file specified to uncompress has not been
  85.           compressed.
  86.       file: compressed with xx bits, can only handle yy bits
  87.           File was compressed by a program that could deal
  88.           with more bits than the compress code on this
  89.           machine.  Recompress the file with smaller bits.
  90.       file: already has .Z suffix -- no change
  91.           The file is assumed to be already compressed.
  92.           Rename the file and try again.
  93.       file: filename too long to tack on .Z
  94.           The file cannot be compressed because its name is
  95.           longer than 12 characters.  Rename and try again.
  96.           This message does not occur on BSD systems.
  97.       file already exists; do you wish to overwrite (y or n)?
  98.           Respond "y" if you want the output file to be
  99.           replaced; "n" if not.
  100.       uncompress: corrupt input
  101.           A SIGSEGV violation was detected which usually means
  102.           that the input file has been corrupted.
  103.       Compression: xx.xx%
  104.           Percentage of the input saved by compression.
  105.           (Relevant only for -v.)
  106.       -- not a regular file: unchanged
  107.           When the input file is not a regular file, (e.g. a
  108.           directory), it is left unaltered.
  109.       -- has xx other links: unchanged
  110.           The input file has links; it is left unchanged.  See
  111.           ln(1) for more information.
  112.       -- file unchanged
  113.           No savings is achieved by compression.  The input
  114.           remains virgin.
  115.